﻿<%@ Page Language="C#" MasterPageFile="~/admin/adminMasterPage.master" AutoEventWireup="true" CodeFile="news.aspx.cs" Inherits="admin_news_news" Title="无标题页" %>

<asp:Content ID="Content2" ContentPlaceHolderID="contentPlaceHolder" Runat="Server">
    <asp:Repeater ID="Repeater1" runat="server" DataSourceID="ObjectDataSource1" 
        onitemcommand="Repeater1_ItemCommand">
        <HeaderTemplate>
           
        </HeaderTemplate>
        <ItemTemplate>
            <table class="news">
            <tr>
                <td><%#DataBinder.Eval(Container, "DataItem.newsContent_cn")%></td>
            </tr>
            <tr>
                <td style="height:2px;"><div class="horizontalLine"></div></td>
            </tr>
            <tr>
                <td><%#DataBinder.Eval(Container,"DataItem.newsContent_en") %></td>
            </tr>
            <tr>
                <td style="height:2px;"><div class="horizontalLine"></div></td>
            </tr>
             <tr>
                <td><%#"发表于:  "+DataBinder.Eval(Container,"DataItem.newsDate") %></td>
            </tr>
            <tr>
                <td style="height:2px;"><div class="horizontalLine"></div></td>
            </tr>
            <tr>
                <td><asp:Button ID="Button1" runat="server" Text="编辑"  CommandName="editNews" CommandArgument='<%#Eval("newsId") %>' CssClass="button" BackColor="Transparent" BorderStyle="None"/>
                    <asp:Button ID="Button2" runat="server" Text="删除"  CommandName="deleteNews" CommandArgument='<%#Eval("newsId") %>' CssClass="button" BackColor="Transparent" BorderStyle="None"/>
                </td>
            </tr>
           </table>
        </ItemTemplate>
        <FooterTemplate>
        </FooterTemplate>
    </asp:Repeater>
    <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
        SelectMethod="getAllNews" TypeName="DB"></asp:ObjectDataSource>
</asp:Content>

